const router = require("koa-router")();

const {
    roleApi
} = require("../../../controller/user/role")

const { check } = require("../../../middleware/routercheck")

router.get("/role/:id", check("getrole"), roleApi)    // 根据 id 获取角色
router.get("/role", check("getrole"), roleApi)    // 获取角色列表
router.post("/role", check("createrole"), roleApi)    // 添加角色
router.put("/role/:id", check("editrole"), roleApi)    // 编辑角色
router.delete("/role/:id", check("removerole"), roleApi)    // 删除角色

module.exports = router;